feathersjs-ecosystem / client

[MOVED] Client side Feathers build

Home Page:https://github.com/feathersjs/feathers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SocketIO timeout based on service

Mangatt opened this issue · comments

Hi,
is it possible to change default 5000ms timeout on SocketIO based on service? 5 seconds are enough for most services, but we need to lift this one specifically on /uploads since those can take more than that.

You should be able to set the timeout property on each service to get individual timeouts:

app.service('uploads').timeout = 30000;

Great, thanks a lot. It would be nice if this could be part of documentation or at least part of Upload file guide.

It looks like it's part of the docs here: http://docs.feathersjs.com/clients/socket-io.html

Yes, there is timeout mentioned, but not a word about usage based on service as @daffl posted here. That's why I posted this issue, since I thought that this is not possible.

Good point. I created an issue for this: feathersjs/docs#220

If someone wants to add this, editing https://github.com/feathersjs/feathers-docs/edit/master/clients/socket-io.md should only take a minute or two 😄

app.service('uploads').timeout = 30000;

now, this code don't work

proprety timeout is undefined

This only available in Websocket client services.