diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -453,7 +453,11 @@ func (c *Client) handleConnack(connack *packet.ConnackPacket) error {
 			// set state to connected
 			c.state.set(StateConnected)
 
-			// TODO: resend stored unacked packets
+			// resend stored packets
+			err := c.resendPackets()
+			if err != nil {
+				return err // error has already been cleaned
+			}
 		} else {
 			// return connection denied error and close connection
 			return c.die(ErrConnectionDenied, true)
@@ -765,3 +769,22 @@ func (c *Client) resetStores() error {
 
 	return nil
 }
+
+// resend left packets in the store
+func (c* Client) resendPackets() error {
+	// retrieve packets
+	packets, err := c.OutgoingStore.All()
+	if err != nil {
+		return c.cleanup(err, true)
+	}
+
+	// resend packets
+	for _, pkt := range packets {
+		err = c.send(pkt)
+		if err != nil {
+			return c.cleanup(err, false)
+		}
+	}
+
+	return nil
+}
resend packets on connect