@Nicehash staff, I think you are abusing of the stratum method "client.reconnect". Why are you sending this? Is it really needed? It adds trouble to the stratum/tcp connection and some extra delays.
Reconnects are needed, because the stratum protocol does not implement a way to change special extranonce parameters except for on first connection. Switching between other pool's relays requires changing these parameters. You can use the patches or patched compiled cgminer that nicehashdev has posted and are available on git. This implements a new command in the stratum protocol so that the reconnects are not necessary.
I see. However if I'm not wrong the client.reconnect method needs host and port parameters. The nicehash stratum server is not providing them, so it makes some system crash.
I'm not using sgminer/cgminer directly, I'm using a stratum proxy instead. Can you provide the specification on this new command so I can implement it in the stratum proxy?