Fix reconnection policy. Improve stream's working with small messages.

WritableStream sends message immediately if buffer is empty.