Use send instead of write to close connection. Fixes jason's curl bug

Conflicts:

	bin/controller